<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
	var proDefName;
	$(function() {
		$('#templateEditForm').form({
			url : '${pageContext.request.contextPath}/template/edit' ,
			onSubmit : function() {
				/* var isValid = $(this).form('validate');
				if (!isValid) {
					progressClose();
				}
				return isValid; */
			},
			success : function(result) {
				//progressClose();
				result = $.parseJSON(result);
				if (result.success) {
					parent.$.modalDialog.handler.dialog('close');
					parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
				} else {
					parent.$.messager.alert('错误', result.msg, 'error');
				}
			}
		});
	});
</script>
<div style="margin: 5px">
	<form id="templateEditForm" method="post" enctype="multipart/form-data">
		<input type="hidden" name="id" value="${formTemplate.id}">
		<table cellspacing="0" cellpadding="3" border="1">
			<tbody>
				<tr bgcolor="#398EB7">
					<td colspan="2"><font color="#ffffff">模板基本信息</font></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td width="150">
						<div align="left">
							<p>
								模板名称 <font face="Verdana"> :&nbsp; </font>
							</p>
						</div></td>
					<td width="324"><font face="Verdana"><input name="name" value="${formTemplate.name}" id="vv" class="easyui-validatebox" data-options="required:true,validType:'string'" /><br> </font></td>
				</tr>
				<tr>
					<td>
						<div align="left">
							<p>
								<font face="Verdana">所用流程:&nbsp;</font> <br>
							</p>
						</div></td>
					<td width="324"><font face="Verdana"> <input id="cc" name="processDefinitionKey" value="${formTemplate.processDefinitionKey}"><br> </font></td>
				</tr>
			</tbody>
		</table>
		<br>
		<br>
		<table cellspacing="0" cellpadding="3" border="1">
			<tbody>
				<tr bgcolor="#398EB7">
					<td colspan="2"><font color="#ffffff">模板文件</font></td>
				</tr>
				<tr>
				</tr>
				<tr>
					<td width="150">
						<div align="left">
							<p>
								<font face="Verdana">档案:&nbsp;</font> <br>
							</p>
						</div></td>
					<td width="324"><font face="Verdana"> <input type="file" name="file" /> <br> </font></td>
				</tr>
			</tbody>
		</table>
	</form>
</div>